home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
v cisle
/
softatlas
/
SDA16.exe
/
{app}
/
SDA.xpi
/
install.js
< prev
next >
Wrap
Text File
|
2006-12-11
|
1KB
|
49 lines
const gName = "SoftAtlas Download Accelerator";
const gAuthor = "SoftAtlas";
const gRegKey = "/sda/FireFox";
const gVersion = "1.57";
const gJar = "sda.jar";
var error = null;
var oFolder = getFolder("Current User", "chrome");
var iContentFlag = CONTENT | PROFILE_CHROME;
// Install in App or Profile?
var existsInApplication = File.exists(getFolder(getFolder("chrome"), gJar));
var existsInProfile = File.exists(getFolder(oFolder, gJar));
// Uninstall Current
if(existsInApplication || existsInProfile)
uninstall(gRegKey);
// Init
initInstall(gName, gRegKey, gVersion);
setPackageFolder(oFolder);
error = addFile(gAuthor, gVersion, "chrome/"+ gJar, oFolder, null);
error = addFile(gAuthor, gVersion, "dowload_link.htm", oFolder, null);
// Register
if(error == SUCCESS){
registerChrome(iContentFlag, getFolder(oFolder, gJar), "content/");
error = performInstall(); //Install
if(error != SUCCESS && error != 999){
switch(error){
case -215:
alert("The installation of the extension failed.\nOne of the files being overwritten is read-only.");
break;
case -235:
alert("The installation of the extension failed.\nThere is insufficient disk space.");
break;
default:
alert("The installation of the extension failed.\nThe error code is: " + error);
}
cancelInstall(error);
}
}
else{
alert("The installation failed.\n" + error);
cancelInstall(error);
}